package com.whmall.service.crm.provider;

import com.whmall.component.entity.dto.PageReqDTO;
import com.whmall.component.entity.dto.PageRspDTO;
import com.whmall.service.crm.api.OverseasLoanCompanyApi;
import com.whmall.service.crm.entity.dto.invoice.OverseasLoanCompanyAddReqDTO;
import com.whmall.service.crm.entity.dto.invoice.OverseasLoanCompanyQueryReqDTO;
import com.whmall.service.crm.entity.dto.invoice.OverseasLoanCompanyRspDTO;
import com.whmall.service.crm.entity.dto.invoice.OverseasLoanCompanyUpdateReqDTO;
import com.whmall.service.crm.module.invoice.service.OverseasLoanCompanyService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(interfaceClass = OverseasLoanCompanyApi.class)
public class OverseasLoanCompanyProvider implements OverseasLoanCompanyApi {

    @Autowired
    private OverseasLoanCompanyService overseasLoanCompanyService;

    @Override
    public PageRspDTO<OverseasLoanCompanyRspDTO> query(OverseasLoanCompanyQueryReqDTO reqDTO, PageReqDTO pageReqDTO) {
        return overseasLoanCompanyService.query(reqDTO, pageReqDTO);
    }

    @Override
    public Long create(OverseasLoanCompanyAddReqDTO reqDTO) {
        return overseasLoanCompanyService.create(reqDTO);
    }

    @Override
    public void update(OverseasLoanCompanyUpdateReqDTO reqDTO) {
        overseasLoanCompanyService.update(reqDTO);
    }

    @Override
    public void enable(Long id, Long employeeId) {
        overseasLoanCompanyService.enable(id, employeeId);
    }

    @Override
    public OverseasLoanCompanyRspDTO findByNameEn(String nameEn) {
        return overseasLoanCompanyService.findByNameEn(nameEn);
    }

    @Override
    public List<OverseasLoanCompanyRspDTO> listByIds(List<Long> ids) {
        return overseasLoanCompanyService.listByIds(ids);
    }

    @Override
    public OverseasLoanCompanyRspDTO findById(Long id) {
        return overseasLoanCompanyService.findById(id);
    }
}
